package com.example.yk.adapter

import com.bumptech.glide.Glide
import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.viewholder.BaseViewHolder
import com.example.yk.R
import com.example.yk.entity.ConditionEntity

class ConditionAdapte(list: MutableList<ConditionEntity>):BaseQuickAdapter<ConditionEntity,BaseViewHolder>(
    R.layout.item_shangpin,list) {
    override fun convert(holder: BaseViewHolder, item: ConditionEntity) {
        holder.setText(R.id.tv_desc,item.title)
        holder.setText(R.id.tv_price,"${item.purchasePrice}元")
        Glide.with(context).load(item.mainImgUrl).into(holder.getView(R.id.iv))
    }
}